Skip to main content

Clear border

Removes mask regions at the border of a mask.

🎭 Mask options and parameters of clearBorder method

clearBorder() method removes the elements at the border of the mask. The elements are cleared depending on the color that user specifies as a parameter. This can be used as a preparatory tool for ROI analysis since there are times when regions do not fit completely on an image. With incomplete elements considered as regions the analysis can become misleading.

clearBorder example

Parameters and default values

  • mask

  • options

Options

PropertyRequiredDefault value
allowCornersnofalse
outno-
colornowhite